package com.moli.iov.util;

import java.util.Date;

public class LoginUtils {
    /**
     * 字符串转化成为16进制字符串
     * @param s
     * @return
     */
    public static String strTo16(String s) {
        String str = "";
        for (int i = 0; i < s.length(); i++) {
            int ch = (int) s.charAt(i);
            String s4 = Integer.toHexString(ch);
            str = str + s4;
        }
        return str;
    }
    public static void main(String[] args) {
        String a="232301fe4c4e425343423346384a5731383639383201001e13050f070e26000338393836303242343037313633303030303931380000e3";
        String vin ="LNBSCB3F8JW186982";
        String iccid="898602B4071630000918";
        String login = "232301fe%s01001e13050f070e260003%s0000e3";
        String login1 = "232301fe%s01001e%s0003%s0000e3";
        String  date="123456";
        System.out.println(strTo16(vin));
        String s = String.format(login, strTo16(vin), strTo16(iccid));
        System.out.println(s);


    }
}
